<template>
	<view>
		 <u-swiper
				:list="list"
				:height="height"
				keyName="image"
				indicatorMode="line"
		></u-swiper>
		<view class="dump" @click="tohome">跳过</view>
	</view>
</template>

<script>
	import {
		getSplash
	} from "@/service/configService.js";
	export default {
		data () {
			return {
				height:0,
				// width:0,
				list:[],
				time:''
			}
		},
		mounted() {
			this.systemInfo();
			getSplash().then(this.getSplash)
		},
		onLoad() {
			this.time=setTimeout(function(){
				uni.redirectTo({
					url:'../index/index'
				})
				uni.$u.vuex('isSplash', true);
			},9600)
		},
		methods:{
			systemInfo(){
				var that=this;
				uni.getSystemInfo({
					success(res) {
						// console.log(res);
						that.height=res.screenHeight
					}
				})
			},
			getSplash(e){
				if(e.code==200){
					this.list=e.result
				}
			},
			tohome(){
				uni.redirectTo({
					url:'../index/index'
				})
				uni.$u.vuex('isSplash', true);
				clearTimeout(this.time)
			}
		}
	}
</script>

<style lang="scss">
	.dump{
		position: fixed;
		bottom:80rpx;
		right:30rpx;
		width:20%;
		height:50rpx;
		font-size: 26rpx;
		line-height: 50rpx;
		border-radius: 35rpx;
		border:1rpx solid #fff;
		background-color: rgba($color: #fff, $alpha: 0.5);
		text-align: center;
	}
</style>
